force div to be square

56

.square {
  width: 50%;
}

.square:after {
  content: "";
  display: block;
  padding-bottom: 100%;
}

Comments

Submit
0 Comments